package automaton;

public class StateImpl implements State {
	private boolean initial, terminal;
	/* Added by Lam Ho */
	private String label;
	/* End: Added by Lam Ho */

	public StateImpl(boolean initial, boolean terminal) {
		this.initial = initial;
		this.terminal = terminal;
	}

	/* Added by Lam Ho */
	public StateImpl(boolean initial, boolean terminal, String label) {
		this.initial = initial;
		this.terminal = terminal;
		this.label = label;
	}
	
	public void setInitial(boolean initial) {
		this.initial = initial;
	}

	public void setTerminal(boolean terminal) {
		this.terminal = terminal;
	}
	/* End: Added by Lam Ho */

	public boolean initial() {
		return initial;
	}

	public boolean terminal() {
		return terminal;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String toString() {
		return "state " + label;
		/*return "state " + super.toString();*/
	}
}
